約 4,585,553 件
https://w.atwiki.jp/sarusaru36/pages/16.html
※日本語入力 SHIFT+スペース ※日本語入力を再可能にする方法 [root@linux14 root]# ps aux | less root 4780 0.0 0.1 5004 2408 ? S 10 01 0 00 kinput2 -canna コマンド投入:kinput2 -canna ?OS(Linux)ディレクトリ? □確認 [root@localhost root]# ls / /(ルート)…パーティション分割されていないデータを格納、起動時に最初に認識 home…一般ユーザのホームディレクトリを格納 boot…カーネルなどシステムの起動に必要なファイルを格納 usr…各コマンドやソフトウェアのプログラムを格納 var…メールやプリントデータのスプール領域、ログファイルなどを格納 swap領域…OSがメモリ不足時にデータを退避する特殊な領域 bin data…一般ユーザの作業用データを格納 etc initrd lost+found mnt proc sbin dev lib misc opt root tmp ?ネットワーク設定の確認? □ホスト名の確認 [root@localhost root]# hostname localhost.localdomain ※再起動 [root@linux14 root]# hostname linux14 □IPアドレス、サブネットマスクの確認 [root@localhost root]# ifconfig lo Link encap Local Loopback inet addr 127.0.0.1 Mask 255.0.0.0 UP LOOPBACK RUNNING MTU 16436 Metric 1 RX packets 1184 errors 0 dropped 0 overruns 0 frame 0 TX packets 1184 errors 0 dropped 0 overruns 0 carrier 0 collisions 0 txqueuelen 0 RX bytes 118770 (115.9 Kb) TX bytes 118770 (115.9 Kb) □デフォルトゲートウェイの確認 [root@localhost root]# route Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface 172.18.9.0 * 255.255.255.0 U 0 0 0 eth0 169.254.0.0 * 255.255.0.0 U 0 0 0 eth0 127.0.0.0 * 255.0.0.0 U 0 0 0 lo default 172.18.9.1 0.0.0.0 UG 0 0 0 eth0 □ネットワーク通信可否の確認 □パーティション設定の確認 [root@localhost root]# df Filesystem 1K-ブロック 使用 使用可 使用% マウント位置 /dev/hda2 5162828 2118652 2781916 44% / /dev/hda1 101089 14768 81102 16% /boot /dev/hda8 3099260 32828 2909000 2% /data /dev/hda5 5162796 32844 4867696 1% /home none 1026388 0 1026388 0% /dev/shm /dev/hda7 5162796 32912 4867628 1% /usr/local /dev/hda6 5162796 90740 4809800 2% /var □インストール済パッケージの確認 [root@localhost root]# rpm -qa | grep telnet-server telnet-server-0.17-26 ?NICドライバのインストール? □CDよりドライバのコピー [root@localhost root]# cp /mnt/cdrom/linux-8.2.18.zip /opt/ □ドライバの解凍&展開 [root@localhost root]# cd /opt/ [root@localhost opt]# unzip linux-8.2.18.zip Archive linux-8.2.18.zip creating Server/Linux/Driver/ inflating Server/Linux/Driver/bcm5700-8.2.18-1.src.rpm inflating Server/Linux/Driver/bcm5700-8.2.18.tar.gz inflating Server/Linux/Driver/bcm_sup-8.2.18.tar.gz inflating Server/Linux/Driver/DISTRIB.TXT inflating Server/Linux/Driver/README.TXT □ディレクトリの移動&ドライバファイルの解凍&展開 [root@localhost opt]# cd Server/Linux/Driver/ [root@localhost Driver]# tar xvfz bcm5700-8.2.18.tar.gz bcm5700-8.2.18/ bcm5700-8.2.18/src/ bcm5700-8.2.18/src/5701rls.c … □ドライバのコンパイル [root@localhost Driver]# cd bcm5700-8.2.18/src/ [root@localhost src]# make gcc -DMODULE -D__KERNEL__ -DDBG=0 -DT3_JUMBO_RCV_RCB_ENTRY_COUNT=256 -DNICE_SUPPORT -DPCIX_TARGET_WORKAROUND=1 -DINCLUDE_TBI_SUPPORT -DINCLUDE_5701_AX_FIX=1 -DRED_HAT_LINUX_KERNEL -Wall -Wstrict-prototypes -I/lib/modules/2.4.21-4.ELsmp/build/include -O2 -c -o b57um.o b57um.c … □ドライバをカーネルにロード [root@localhost src]# insmod bcm5700.o □システムインストール [root@localhost src]# make install gzip -c bcm5700.4 bcm5700.4.gz □NICをデバイス名「eth0」で設定 [root@localhost src]# vi /etc/modules.conf ※VIエヂィタの使用方法は別紙参照 設定内容の追加 alias eth0 bcm5700 □システム再起動 [root@localhost src]# init 6 □再起動後のファイル設定(「IPアドレス」と「ホスト名」の名前解決用) [root@localhost root]# vi /etc/hosts # Do not remove the following line, or various programs # that require network functionality will fail. 127.0.0.1 linux14 localhost.localdomain localhost □再起動後のファイル設定(自分から見るホスト名) [root@localhost root]# vi /etc/sysconfig/network NETWORKING=yes HOSTNAME=linux14 □IPアドレス、サブネットマスクの確認 [root@localhost root]# ifconfig eth0 Link encap Ethernet HWaddr 00 13 20 58 34 83 inet addr 172.18.9.114 Bcast 172.18.9.255 Mask 255.255.255.0 UP BROADCAST RUNNING MULTICAST MTU 1500 Metric 1 RX packets 84 errors 0 dropped 0 overruns 0 frame 0 TX packets 1 errors 0 dropped 0 overruns 0 carrier 0 collisions 0 txqueuelen 1000 RX bytes 19197 (18.7 Kb) TX bytes 64 (64.0 b) Interrupt 10 Memory ff7f0000-ff800000 lo Link encap Local Loopback inet addr 127.0.0.1 Mask 255.0.0.0 UP LOOPBACK RUNNING MTU 16436 Metric 1 RX packets 2079 errors 0 dropped 0 overruns 0 frame 0 TX packets 2079 errors 0 dropped 0 overruns 0 carrier 0 collisions 0 txqueuelen 0 RX bytes 213254 (208.2 Kb) TX bytes 213254 (208.2 Kb) □ネットワーク通信可否の確認 [root@localhost root]# ping 172.18.14.204 PING 172.18.14.204 (172.18.14.204) 56(84) bytes of data. 64 bytes from 172.18.14.204 icmp_seq=0 ttl=63 time=4.02 ms 64 bytes from 172.18.14.204 icmp_seq=1 ttl=63 time=0.318 ms … --- 172.18.14.204 ping statistics --- 21 packets transmitted, 21 received, 0% packet loss, time 20040ms rtt min/avg/max/mdev = 0.259/0.806/6.046/1.433 ms, pipe 2 □起動中のサーバの確認? [root@localhost root]# ps aux USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND root 1 0.1 0.0 1508 508 ? S 15 47 0 03 init root 4624 0.0 0.0 1564 472 ? S 15 50 0 00 gpm - □ログインIDの確認 [root@localhost root]# pwd /root □ファイル転送(FTPコマンド使用) ※今回はデータ入手のため [root@localhost root]# ftp 172.18.14.204 Connected to 172.18.14.204. 220 (vsFTPd 1.2.1) 530 Please login with USER and PASS. 530 Please login with USER and PASS. KERBEROS_V4 rejected as an authentication type Name (172.18.14.204 root) Name (172.18.14.204 root) ftp 331 Please specify the password. Password 230 Login successful. Remote system type is UNIX. Using binary mode to transfer files. ftp cd pub 250 Directory successfully changed. ftp prompt Interactive mode off. ftp cd .. 250 Directory successfully changed. ftp ls 227 Entering Passive Mode (172,18,14,204,165,154) 150 Here comes the directory listing. drwxr-xr-x 5 0 0 4096 Nov 16 2005 DOCS_RHEL3 -rw-r--r-- 1 0 0 122880 Aug 28 2008 UML13L.tar drwxr-xr-x 2 0 0 4096 Mar 28 09 26 UMS89L_OLD -rw-r--r-- 1 0 0 3442 Jan 08 2010 check.sh 226 Directory send OK. ftp cd pub-UBS06L 250 Directory successfully changed. ftp ls 227 Entering Passive Mode (172,18,14,204,245,248) 150 Here comes the directory listing. drwxr-xr-x 2 0 0 4096 Jan 24 07 54 RHEL3 drwxr-xr-x 2 0 0 4096 Jan 24 08 00 RHEL5 -rw-rw-rw- 1 0 0 48984 Sep 10 2008 init 226 Directory send OK. ftp cd RHEL3 250 Directory successfully changed. ftp bin 200 Switching to Binary mode. ftp mget * local Hello.java remote Hello.java 227 Entering Passive Mode (172,18,14,204,161,142) 150 Opening BINARY mode data connection for Hello.java (107 bytes). 226 File send OK. 1316612 bytes received in 0.17 seconds (7.4e+03 Kbytes/s) ftp by □ [root@localhost root]# ls アパッチのパッケージ: apache-tomcat-5.5.20.tar.gz JDK jdk-1_5_0_11-linux-i586-rpm.bin postgresql-8.2.3.tar.gz httpd-2.2.4.tar.gz tomcat-connectors-1.2.20-src.tar.gz Hello.java install.log anaconda-ks.cfg install.log.syslog freemarknans.tgz □システム停止 init 0 ※PowerOFFのメッセージ表示がされたら、電源のOFFが必要! □登録されているユーザの確認 [root@linux14 root]# vi /etc/passwd root x 0 0 root /root /bin/bash bin x 1 1 bin /bin /sbin/nologin daemon x 2 2 daemon /sbin /sbin/nologin adm x 3 4 adm /var/adm /sbin/nologin ※LINUXインストール時に自動で作られるユーザ □LINUXのパケットフィルタリング機能の設定確認 [root@linux14 root]# iptables -L 外からアクセス: Chain INPUT (policy ACCEPT) target prot opt source destination 自分自身転送で: Chain FORWARD (policy ACCEPT) target prot opt source destination 自分自身で外に出す: Chain OUTPUT (policy ACCEPT) target prot opt source destination □<参考>Apacheのコンテンツに対するアクセス権設定 コンテンツの所有者変更(※階層的に処理): chown -R xxxxx gggggg /uer/local/apache2/htdocs コンテンツのアクセス権の設定: chmod 440 /uer/local/apache2/htdocs/* ?Apacheのインストール作業? □Apacheの圧縮ファイルの展開(解凍) [root@linux14 root]# tar zxvf httpd-2.2.4.tar.gz -C /usr/local/src … httpd-2.2.4/Apache.dsw httpd-2.2.4/LICENSE httpd-2.2.4/Makefile.in httpd-2.2.4/config.layout httpd-2.2.4/INSTALL □移動 [root@linux14 root]# cd /usr/local/src/httpd-2.2.4/ [root@linux14 httpd-2.2.4]# ls ABOUT_APACHE LICENSE ROADMAP configure libhttpd.dsp Apache.dsw Makefile.in VERSIONING configure.in modules BuildBin.dsp Makefile.win acinclude.m4 docs os CHANGES NOTICE apachenw.mcp.zip emacs-style server INSTALL NWGNUmakefile build httpd.dsp srclib InstallBin.dsp README buildconf httpd.spec support LAYOUT README.platforms config.layout include test □Apache用のMakefileの作成 [root@linux14 httpd-2.2.4]# ./configure … config.status creating build/pkg/pkginfo config.status creating build/config_vars.sh config.status creating include/ap_config_auto.h config.status executing default commands □Apache用のコンパイル [root@linux14 httpd-2.2.4]# make Making all in srclib make[1] 入ります ディレクトリ `/usr/local/src/httpd-2.2.4/srclib Making all in apr … /usr/local/src/httpd-2.2.4/srclib/apr/libtool --silent --mode=link gcc -g -O2 -pthread -o httpd modules.lo buildmark.o -export-dynamic server/libmain.la modules/aaa/libmod_authn_file.la modules … make[1] 出ます ディレクトリ `/usr/local/src/httpd-2.2.4 □Apache用のインストール [root@linux14 httpd-2.2.4]# make install Making install in srclib make[1] 入ります ディレクトリ `/usr/local/src/httpd-2.2.4/srclib Making install in apr … mkdir /usr/local/apache2/man/man8 mkdir /usr/local/apache2/manual make[1] 出ます ディレクトリ `/usr/local/src/httpd-2.2.4 □移動&Apache設定ファイルのバックアップ [root@linux14 httpd-2.2.4]# cd /usr/local/apache2/conf/ [root@linux14 conf]# cp httpd.conf httpd.conf.bk □Apache設定ファイルの確認&設定 [root@linux14 conf]# vi httpd.conf ServerRoot "/usr/local/apache2" Listen 80 User daemon Group daemon ServerAdmin root@linux14.com ServerName linux14 80 DocumentRoot "/usr/local/apache2/htdocs" Directory / Options FollowSymLinks AllowOverride None Order deny,allow Deny from all /Directory IfModule dir_module DirectoryIndex index.html /IfModule FilesMatch "^\.ht" Order allow,deny Deny from all Satisfy All /FilesMatch VirtualHost # container, that host s errors will be logged there and not here. # ErrorLog logs/error_log # LogLevel Control the number of messages logged to the error_log. # Possible values include debug, info, notice, warn, error, crit, # alert, emerg. # LogLevel warn Directory "/usr/local/apache2/cgi-bin" AllowOverride None Options None Order allow,deny Allow from all /Directory DefaultType text/plain AddType application/x-compress .Z AddType application/x-gzip .gz .tgz IfModule ssl_module SSLRandomSeed startup builtin SSLRandomSeed connect builtin /IfModule # Server-pool management (specific) Include conf/extra/httpd-mpm.conf □最大接続数「httpd-mpm.conf」ファイルの確認&設定 [root@linux14 apache2]# vi /usr/local/apache2/conf/extra/httpd-mpm.conf IfModule mpm_prefork_module StartServers 5 MinSpareServers 5 MaxSpareServers 10 MaxClients 150 MaxRequestsPerChild 0 /IfModule □Apacheの起動 [root@linux14 apache2]# /usr/local/apache2/bin/apachectl start □Apacheの起動確認 [root@linux14 apache2]# ps aux | grep httpd root 24165 0.0 0.0 3576 1696 ? S 13 04 0 00 /usr/local/apache2/bin/httpd -k start daemon 24166 0.0 0.0 3568 1696 ? S 13 04 0 00 /usr/ □ブラウザを使用して以下のURLでアクセス確認 http //localhost/ □Apacheの停止 [root@linux14 apache2]# /usr/local/apache2/bin/apachectl stop [root@linux14 apache2]# ps aux | grep httpd root 24205 0.0 0.0 4668 684 pts/0 S 13 09 0 00 grep httpd □Apacheのフォルダ構成 [root@linux14 httpd-2.2.4]# cd /usr/local/apache2/ [root@linux14 apache2]# ls bin cgi-bin error icons lib man modules build conf htdocs include logs manual ?APサーバの構築(JDK、TOMCAT)? □JDKパッケージファイルの作成 ※先にファイルに実行権を与える [root@linux14 root]# chmod u+x jdk-1_5_0_11-linux-i586-rpm.bin Do you agree to the above license terms? [yes or no] yes Unpacking... Checksumming... 0 0 Extracting... UnZipSFX 5.42 of 14 January 2001, by Info-ZIP (Zip-Bugs@lists.wku.edu). inflating jdk-1_5_0_11-linux-i586.rpm Preparing... ########################################### [100%] 1 jdk ########################################### [100%] Done. □一般ユーザ(root含む)の環境変数の変更 [root@linux14 root]# vi /etc/profile ※最終行に「JDK用のコマンド」が使用できるように以下を追加 export JAVA_HOME=/usr/java/jdk1.5.0_11 export PATH=$PATH $JAVA_HOME/bin □JAVAファイルのコンパイル確認&実行 [root@linux14 root]# javac Hello.java [root@linux14 root]# ls Hello.class Hello.class [root@linux14 root]# java Hello Hello !!! [root@linux14 root]# less Hello.java public class Hello { public static void main(String[] args) { System.out.println("Hello !!!"); } } ?TOMCATのインストール、環境設定? □ユーザ追加 [root@linux14 root]# useradd postgres □TOMCATファイル(圧縮版)の解凍 [root@linux14 root]# tar zxvf apache-tomcat-5.5.20.tar.gz -C /usr/local/ ※「ーC」オプションで展開先の指定 □TOMCATインストール先ディレクトリの所有者の変更 [root@linux14 root]# cd /usr/local/ [root@linux14 local]# chown -R postgres postgres apache-tomcat-5.5.20 ※「ーR」オプションで指定した階層全てを処理 □展開したディレクトリに「tomcat」シンボリックリンクを作成 [root@linux14 local]# ln -s apache-tomcat-5.5.20 tomcat □「postgres」ユーザ用の環境変数の設定 [root@linux14 local]# su - postgres [postgres@linux14 postgres]$ vi .bashrc export CATALINA_HOME=/usr/local/tomcat export PATH=$PATH $CATALINA_HOME/bin export CLASSPATH=$CATALINA_HOME/common/lib/servlet-api.jar □「postgres」ユーザ用の環境変数の反映 [postgres@linux14 postgres]$ exit logout [root@linux14 local]# su - postgres [postgres@linux14 postgres]$ □TOMCATのコマンド起動確認 [postgres@linux14 postgres]$ startup.sh Using CATALINA_BASE /usr/local/tomcat Using CATALINA_HOME /usr/local/tomcat Using CATALINA_TMPDIR /usr/local/tomcat/temp Using JRE_HOME /usr/java/jdk1.5.0_11 □ブラウザでTOMCAT用サンプルページの確認 http //localhost 8080/ http //localhost 8080/aaa →「HTTPステータス 404 - /aaa」のエラー表示 □TOMCATのコマンド停止確認 [postgres@linux14 postgres]$ shutdown.sh Using CATALINA_BASE /usr/local/tomcat Using CATALINA_HOME /usr/local/tomcat Using CATALINA_TMPDIR /usr/local/tomcat/temp Using JRE_HOME /usr/java/jdk1.5.0_11 □TOMCATインストール後のディレクトリ構成の確認 [postgres@linux14 local]$ ls tomcat/ bin…Tomocatに添付される実行プログラムが格納される conf…TOMCAT専用の環境設定ファイルが格納 common…ライブラリやクラスが格納 logs…ログファイルが格納 shared…全てのアプリケーションで共有されるライブラリやクラスが格納 server…ライブラリやクラスが格納 webapps…アプリケーションコンテンツが格納 work…一時ファイルを格納 temp LICENSE RELEASE-NOTES NOTICE RUNNING.txt ?ApacheとTOMCATの接続連携確認? □TOMCAT側の連携モジュール「mod_jk」の解凍 [root@linux14 root]# ls Hello.class install.log Hello.java install.log.syslog anaconda-ks.cfg jdk-1_5_0_11-linux-i586-rpm.bin apache-tomcat-5.5.20.tar.gz jdk-1_5_0_11-linux-i586.rpm freemarknans.tgz postgresql-8.2.3.tar.gz httpd-2.2.4.tar.gz tomcat-connectors-1.2.20-src.tar.gz [root@linux14 root]# tar zxvf tomcat-connectors-1.2.20-src.tar.gz -C /usr/local/src/ □コンパイル用「configure」ファイルの作成 [root@linux14 root]# cd /usr/local/src/tomcat-connectors-1.2.20-src/native/ [root@linux14 native]# ls BUILDING NEWS aclocal.m4 common iis scripts CHANGES README apache-1.3 configure jni Makefile.am STATUS.txt apache-2.0 configure.in netscape Makefile.in TODO buildconf.sh docs nt_service [root@linux14 native]# ./buildconf.sh rm autom4te.cache libtoolize --force --automake --copy aclocal autoheader automake -a --foreign --copy configure.in 8 `automake requires `AM_CONFIG_HEADER , not `AC_CONFIG_HEADER configure.in installing `scripts/build/unix/mkinstalldirs autoconf rm autom4te.cache □Apacheに連携モジュールを組み込むためMakefileの作成 [root@linux14 native]# ./configure --with-apxs=/usr/local/apache2/bin/apxs ※「apache2/bin/apxs」は拡張ツール □連携モジュールのコンパイル [root@linux14 native]# make □連携モジュールのインストール [root@linux14 native]# make install □インストール済みの連携モジュールの確認 [root@linux14 native]# ls /usr/local/apache2/modules/ httpd.exp mod_jk.so □連携モジュール用の設定ファイルをApache用ディレクトリ配下へコピー [root@linux14 native]# cd ../conf/ [root@linux14 conf]# ls uriworkermap.properties workers.properties workers.properties.minimal [root@linux14 conf]# cp workers.properties /usr/local/apache2/conf/ □Apacheの設定ファイルに連携モジュールを設定 [root@linux14 conf]# vi /usr/local/apache2/conf/httpd.conf … LoadModule jk_module modules/mod_jk.so ※Apache起動時に連携モジュールを組み込む設定 JkMount /*.jsp ajp13 ※ApacheとTomcatの連携時にアプリケーションを読み込むためのURL指定 □Apacheの設定ファイルに連携先(APサーバ側)の「JDK」「Tomcat」を設定 [root@linux14 conf]# vi /usr/local/apache2/conf/workers.properties … # # workers.tomcat_home should point to the location where you # installed tomcat. This is where you have your conf, webapps and lib # directories. # workers.tomcat_home=/usr/local/tomcat # # workers.java_home should point to your Java installation. Normally # you should have a bin and lib directories beneath it. # workers.java_home=/usr/java/jdk1.5.0_11 □TOMCATの設定ファイルのバックアップ [root@linux14 conf]# cd /usr/local/tomcat/conf/ [root@linux14 conf]# cp server.xml server.xml.bk [root@linux14 conf]# cp web.xml web.xml.bk [root@linux14 conf]# ls Catalina context.xml server.xml web.xml catalina.policy logging.properties server.xml.bk web.xml.bk catalina.properties server-minimal.xml tomcat-users.xml □TOMCAT側の設定ファイルの編集 [root@linux14 conf]# su - postgres [postgres@linux14 postgres]$ vi /usr/local/tomcat/conf/server.xml ※TOMCATのWEBサーバ機能の停止(8080ポートの無効化) !-- Connector port="8080" maxHttpHeaderSize="8192" maxThreads="150" minSpareThreads="25" maxSpareThreads="75" enableLookups="false" redirectPort="8443" acceptCount="100" connectionTimeout="20000" disableUploadTimeout="true" / -- ※(Apache側からの)同時アクセス数の設定 !-- Define an AJP 1.3 Connector on port 8009 -- Connector port="8009" maxThreads="120" minSpareThreads="25" maxSpareThreads="100" enableLookups="false" redirectPort="8443" protocol="AJP/1.3" / ※maxThreads="120"…同時処理スレッドの最大数 ※minSpareThreads="25" …待機スレッド数の最小値 ※maxSpareThreads="100"…待機スレッド数の最大値 □設定値を有効にするための再ログイン □Apacheの起動確認 [root@linux14 root]# /usr/local/apache2/bin/apachectl start [root@linux14 root]# ps aux | grep httpd root 29981 0.0 0.0 3832 1944 ? S 17 16 0 00 /usr/local/apache2/bin/httpd -k start daemon 29982 0.0 0.0 3832 1940 ? S 17 16 0 00 /usr/ □TOMCAT起動ユーザ「postgres」に変更し、TOMCATの起動 [root@linux14 root]# su - postgres [postgres@linux14 postgres]$ startup.sh Using CATALINA_BASE /usr/local/tomcat Using CATALINA_HOME /usr/local/tomcat Using CATALINA_TMPDIR /usr/local/tomcat/temp Using JRE_HOME /usr/java/jdk1.5.0_11 □ブラウザよりApacheとTOMCATの接続連携の確認 http //localhost 8080/ →アクセス拒否OK http //localhost/index.jsp →アクセス確認OK □TOMCATの停止 [postgres@linux14 postgres]$ shutdown.sh Using CATALINA_BASE /usr/local/tomcat Using CATALINA_HOME /usr/local/tomcat Using CATALINA_TMPDIR /usr/local/tomcat/temp Using JRE_HOME /usr/java/jdk1.5.0_11 ※TOMCATユーザ「postgres」ではApacheの停止が出来ない [postgres@linux14 postgres]$ /usr/local/apache2/bin/apachectl stop httpd (pid 29981?) not running [postgres@linux14 postgres]$ exit logout □Apacheの停止 [root@linux14 root]# /usr/local/apache2/bin/apachectl stop [root@linux14 root]# ps aux | grep httpd root 30198 0.0 0.0 4680 684 pts/0 S 17 30 0 00 grep httpd ?DBサーバの構築(PostgresSQLのインストール)? □POSTGRES-SQLのインストール用ディレクトリの作成&所有者変更 [root@linux14 root]# mkdir /usr/local/pgsql [root@linux14 root]# chown postgres postgres /usr/local/pgsql/ □PostgresSQLの圧縮ファイルを指定したディレクトリへ解凍 [root@linux14 root]# tar zxvf postgresql-8.2.3.tar.gz -C /usr/local/src/ [root@linux14 root]# ls /usr/local/src/ httpd-2.2.4 postgresql-8.2.3 tomcat-connectors-1.2.20-src □ファイルを解凍した後に生成されたディレクトリの所有者変更&移動 [root@linux14 root]# chown -R postgres postgres /usr/local/src/postgresql-8.2.3/ [root@linux14 root]# su - postgres [postgres@linux14 postgres]$ cd /usr/local/src/postgresql-8.2.3/ [postgres@linux14 postgresql-8.2.3]$ ls COPYRIGHT HISTORY Makefile aclocal.m4 configure contrib src GNUmakefile.in INSTALL README config configure.in doc □PostgresSQLをコンパイル&インストール用のMakefileを作成 ※利用しているOSに的したMakefileの作成を行う [postgres@linux14 postgresql-8.2.3]$ ./configure checking build system type... i686-pc-linux-gnu checking host system type... i686-pc-linux-gnu checking which template to use... linux checking whether to build with 64-bit integer date/time support... no checking whether NLS is wanted... no checking for default port number... 5432 checking for gcc... gcc checking for C compiler default output file name... … □PostgresSQLのコンパイル [postgres@linux14 postgresql-8.2.3]$ make all make -C doc all make[1] 入ります ディレクトリ `/usr/local/src/postgresql-8.2.3/doc gzip -d -c man.tar.gz | /bin/tar xf - for file in man1/*.1; do \ mv $file $file.bak \ sed -e s/\\fR(l)/\\fR(7)/ $file.bak $file \ rm -f $file.bak || exit; \ done /bin/sh ../config/mkinstalldirs man7 … make[1] 出ます ディレクトリ `/usr/local/src/postgresql-8.2.3/config All of PostgreSQL successfully made. Ready to install. ※なんとなく確認 [postgres@linux14 postgresql-8.2.3]$ ls COPYRIGHT HISTORY README config.log configure.in src GNUmakefile INSTALL aclocal.m4 config.status contrib GNUmakefile.in Makefile config configure doc □PostgresSQLのインストール [postgres@linux14 postgresql-8.2.3]$ make install make -C doc install make[1] 入ります ディレクトリ `/usr/local/src/postgresql-8.2.3/doc mkdir -p -- /usr/local/pgsql/doc/html mkdir -p -- /usr/local/pgsql/man/man1 /usr/local/pgsql/man/man7 gzip -d -c ./postgres.tar.gz | ( cd /usr/local/pgsql/doc/html /bin/tar xf - )for file in man1/*.1 man7/*.7 ; do \ /bin/sh ../config/install-sh -c -m 644 $file /usr/local/pgsql/man/$file || exit; \ … ake[1] 出ます ディレクトリ `/usr/local/src/postgresql-8.2.3/config PostgreSQL installation complete. ※なんとなく確認 [postgres@linux14 postgresql-8.2.3]$ ls COPYRIGHT HISTORY README config.log configure.in src GNUmakefile INSTALL aclocal.m4 config.status contrib GNUmakefile.in Makefile config configure doc □PostgresSQLのマニュアルインストール [postgres@linux14 postgresql-8.2.3]$ cd doc/ [postgres@linux14 doc]$ make install gzip -d -c ./postgres.tar.gz | ( cd /usr/local/pgsql/doc/html /bin/tar xf - )for file in man1/*.1 man7/*.7 ; do \ /bin/sh ../config/install-sh -c -m 644 $file /usr/local/pgsql/man/$file || exit; \ done ※なんとなく確認 [postgres@linux14 doc]$ ls FAQ FAQ_SCO FAQ_german MISSING_FEATURES man.tar.gz FAQ_AIX FAQ_Solaris FAQ_hungarian Makefile man1 FAQ_CYGWIN FAQ_brazilian FAQ_japanese README.mb.big5 man7 FAQ_DEV FAQ_chinese FAQ_polish README.mb.jp manl FAQ_HPUX FAQ_czech FAQ_russian TODO postgres.tar.gz FAQ_IRIX FAQ_farsi FAQ_turkish TODO.detail src FAQ_MINGW FAQ_french KNOWN_BUGS bug.template □「postgres」ユーザで環境変数の編集 [postgres@linux14 postgres]$ pwd /home/postgres [postgres@linux14 postgres]$ vi .bashrc … # .bashrc # User specific aliases and functions # Source global definitions if [ -f /etc/bashrc ]; then . /etc/bashrc fi export CATALINA_HOME=/usr/local/tomcat export PATH=$PATH $CATALINA_HOME/bin export CLASSPATH=$CATALINA_HOME/common/lib/servlet-api.jar export POSTGRES_HOME=/usr/local/pgsql export PGDATA=$POSTGRES_HOME/data export PGLIB=$POSTGRES_HOME/lib export LD_LIBRARY_PATH=$LD_LIBRARY_PATH $PGLIB export PATH=$PATH $POSTGRES_HOME/bin export MANPATH=$MANPATH $POSTGRES_HOME/man ※環境変数の捕捉説明 POSTGRES_HOME…PostgreSQLをインストールをしたディレクトリの指定 PGDATA…データベース用のディレクトリの指定 PGLIB…PostgreSQLのライブラリがインストールをしたディレクトリの指定 LD_LIBRARY_PATH…PostgreSQLがライブラリを検索するディレクトリの指定 PATH…PostgreSQLがコマンドを検索するディレクトリの指定 MANPATH…manコマンドでマニュアルを検索するディレクトリの指定 □データベースの初期化 [postgres@linux14 doc]$ exit logout [root@linux14 root]# su - postgres [postgres@linux14 postgres]$ initdb The files belonging to this database system will be owned by user "postgres". This user must also own the server process. The database cluster will be initialized with locale ja_JP.eucJP. The default database encoding has accordingly been set to EUC_JP. creating directory /usr/local/pgsql/data ... ok … □PostgresSQLの設定ファイルのバックアップ [postgres@linux14 postgres]$ cd /usr/local/pgsql/data/ [postgres@linux14 data]$ ls PG_VERSION global pg_hba.conf pg_multixact pg_tblspc pg_xlog base pg_clog pg_ident.conf pg_subtrans pg_twophase postgresql.conf [postgres@linux14 data]$ cp postgresql.conf postgresql.conf.bk □PostgresSQLの設定ファイルの編集 [postgres@linux14 data]$ vi postgresql.conf … listen_addresses = localhost,172.18.9.114 # what IP address(es) to listen on; … port = 5432 # (change requires restart) max_connections = 100 # (change requires restart) … shared_buffers = 24MB # min 128kB or max_connections*16kB □ [postgres@linux14 data]$ exit logout [root@linux14 root]# su - postgres [postgres@linux14 postgres]$ □Postgresデータベースの起動 [postgres@linux14 postgres]$ pg_ctl start server starting [postgres@linux14 postgres]$ LOG database system was shut down at 2011-06-15 11 09 47 JST LOG checkpoint record is at 0/42C210 LOG redo record is at 0/42C210; undo record is at 0/0; shutdown TRUE LOG next transaction ID 0/593; next OID 10820 LOG next MultiXactId 1; next MultiXactOffset 0 LOG database system is ready □test用データベースの作成 [postgres@linux14 postgres]$ createdb -E EUC_JP testdb CREATE DATABASE □test用データベースへの接続&テーブル作成確認 [postgres@linux14 postgres]$ psql testdb Welcome to psql 8.2.3, the PostgreSQL interactive terminal. Type \copyright for distribution terms \h for help with SQL commands \? for help with psql commands \g or terminate with semicolon to execute query \q to quit testdb=# CREATE TABLE test_table( no integer not null, name varchar(20), id varchar(1)); CREATE TABLE testdb=# INSERT INTO test_table VALUES ( testdb(# 1, testdb(# テスト用 , testdb(# 1); INSERT 0 1 testdb=# SELECT * from test_table ; no | name | id ----+----------+---- 1 | テスト用 | 1 (1 row) testdb=# \q □データベースの停止 [postgres@linux14 postgres]$ pg_ctl stop waiting for server to shut down....LOG received smart shutdown request LOG shutting down LOG database system is shut down done server stopped □PostgresSQLのディレクトリ構成 [root@linux14 root]# ls /usr/local/pgsql/ data… →base… →global… →pg_xlog… →pg_clog… →postgresql.conf…PostgresSQLの設定(ユーザ、接続IP、接続数、バッファサイズ、ログ) →postgresql.conf.bk… →pg_hba.conf…PostgresSQLへのアクセス制限 →PG_VERSION… →pg_multixact… →pg_twophase… →pg_subtrans… →postmaster.opts… →pg_ident.conf… →pg_tblspc… bin… doc… include… lib… man… share… ?WEB/AP/DBサーバの連携テスト? □サンプルプログラムの解凍展開 [root@linux14 root]# tar zxvf freemarknans.tgz -C /home/postgres ※DBサーバに関する作業 □データベースの起動 [root@linux14 root]# su - postgres [postgres@linux14 postgres]$ pg_ctl start server starting [postgres@linux14 postgres]$ LOG database system was shut down at 2011-06-15 11 26 06 JST LOG checkpoint record is at 0/43E2C8 LOG redo record is at 0/43E2C8; undo record is at 0/0; shutdown TRUE LOG next transaction ID 0/602; next OID 16387 LOG next MultiXactId 1; next MultiXactOffset 0 LOG database system is ready □テスト用テーブルの作成 ※サンプルSQLを実行 [postgres@linux14 postgres]$ psql -f createtable.sql testdb ERROR index "madidx" does not exist STATEMENT drop index madidx; psql createtable.sql 1 ERROR index "madidx" does not exist ERROR table "stock" does not exist STATEMENT drop table stock; … ※APサーバに関する作業 □サンプルアプリケーション用データのTOMCAT配下のWEBAPPSに配置 [postgres@linux14 postgres]$ cp -r freemarknans /usr/local/tomcat/webapps/ □データベースアクセス用JDBCドライバの導入 [postgres@linux14 postgres]$ cp postgresql-8.2-504.jdbc3.jar /usr/local/tomcat/webapps/freemarknans/WEB-INF/lib/ □サンプルアプリケーションにDBサーバのIPアドレスを設定 [postgres@linux14 postgres]$ vi /usr/local/tomcat/webapps/freemarknans/WEB-INF/classes/market/dao/DB.properties … DRIVERNAME=org.postgresql.Driver URL=jdbc postgresql //localhost 5432/testdb USER=postgres □WEBサーバ(Apache)側の設定ファイル(連携モジュール)に連携させるサンプルプログラムを設定 [postgres@linux14 postgres]$ exit logout [root@linux14 root]# vi /usr/local/apache2/conf/httpd.conf … LoadModule jk_module modules/mod_jk.so JkMount /*.jsp ajp13 JkMount /freemarknans/* ajp13 □WEBサーバ(Apache)の起動 [root@linux14 root]# /usr/local/apache2/bin/apachectl start [root@linux14 root]# ps aux | grep httpd root 18418 0.0 0.0 3820 1940 ? S 13 33 0 00 /usr/local/apache2/bin/httpd -k start daemon 18419 0.0 0.0 3820 1936 ? S 13 33 0 00 /usr/local/apache2/bin/httpd -k start daemon 18420 0.0 0.0 3820 1936 ? S 13 33 0 00 /usr/local/apache2/bin/httpd -k start daemon 18421 0.0 0.0 3820 1936 ? S 13 33 0 00 /usr/local/apache2/bin/httpd -k start daemon 18422 0.0 0.0 3820 1936 ? S 13 33 0 00 /usr/local/apache2/bin/httpd -k start daemon 18423 0.0 0.0 3820 1936 ? S 13 33 0 00 /usr/local/apache2/bin/httpd -k start root 18425 0.0 0.0 4684 688 pts/0 S 13 33 0 00 grep httpd □APサーバ(Tomcat)の起動 [root@linux14 root]# su - postgres [postgres@linux14 postgres]$ startup.sh Using CATALINA_BASE /usr/local/tomcat Using CATALINA_HOME /usr/local/tomcat Using CATALINA_TMPDIR /usr/local/tomcat/temp Using JRE_HOME /usr/java/jdk1.5.0_11 □ブラウザで接続確認 http //localhost/freemarknans/jsp/index.html ※「WEB-SV」→「AP-SV」→「DB-SV」への接続 ?データのバックアップ&リストア(Postgres提供用、OS:Linux提供用)? □接続先デバイスの事前確認 [postgres@linux14 postgres]$ df -k Filesystem 1K-ブロック 使用 使用可 使用% マウント位置 /dev/hda2 5162828 2388452 2512116 49% / /dev/hda1 101089 14768 81102 16% /boot /dev/hda8 3099260 32828 2909000 2% /data /dev/hda5 5162796 36952 4863588 1% /home none 1026388 0 1026388 0% /dev/shm /dev/hda7 5162796 377244 4523296 8% /usr/local /dev/hda6 5162796 92624 4807916 2% /var □対象ファイルとバックアップファイル名 バックアップ対象DB:testdb バックアップファイル名:testdb.bkup □データベースの起動 [postgres@linux14 postgres]$ pg_ctl start server starting [postgres@linux14 postgres]$ LOG database system was shut down at 2011-06-15 14 16 02 JST LOG checkpoint record is at 0/480080 LOG redo record is at 0/480080; undo record is at 0/0; shutdown TRUE LOG next transaction ID 0/901; next OID 16432 LOG next MultiXactId 1; next MultiXactOffset 0 LOG database system is ready □Postgres提供用バックアップコマンド [postgres@linux14 postgres]$ pg_dump -U postgres -f testdb.bkup testdb ※「-U」指定ユーザで接続、「-f」指定ファイルで出力 [postgres@linux14 postgres]$ ls createtable.sql freemarknans postgresql-8.2-504.jdbc3.jar testdb.bkup □Postgres提供用リストアコマンド ※一旦DB削除 [postgres@linux14 postgres]$ dropdb -U postgres testdb DROP DATABASE ※その後、復元先DBの作成 [postgres@linux14 postgres]$ createdb -E EUC_JP -U postgres testdb CREATE DATABASE ※復元先DBに接続し、データ存在しないことを確認 [postgres@linux14 postgres]$ psql testdb Welcome to psql 8.2.3, the PostgreSQL interactive terminal. Type \copyright for distribution terms \h for help with SQL commands \? for help with psql commands \g or terminate with semicolon to execute query \q to quit testdb=# \d No relations found. testdb=# \q ※バックアップしたデータベースをリストア(復元) [postgres@linux14 postgres]$ psql -d testdb -f testdb.bkup ※バックアップ後のデータベースの確認 [postgres@linux14 postgres]$ psql testdb Welcome to psql 8.2.3, the PostgreSQL interactive terminal. Type \copyright for distribution terms \h for help with SQL commands \? for help with psql commands \g or terminate with semicolon to execute query \q to quit testdb=# \d List of relations Schema | Name | Type | Owner --------+------------+----------+---------- public | category | table | postgres public | member | table | postgres public | membernum | sequence | postgres public | ordernum | sequence | postgres public | orders | table | postgres public | product | table | postgres public | stock | table | postgres public | test_table | table | postgres (8 rows) □OS Linux提供用バックアップコマンド 対象パーティション:「/usr/local/」=「/dev/hda7/」 □バックアップ対象DBの停止 [postgres@linux14 postgres]$ pg_ctl stop waiting for server to shut down....LOG received smart shutdown request LOG shutting down LOG database system is shut down done server stopped □シングルユーザモードへ切替え [root@linux14 root]# init 1 ※「GUI画面」から「CUI画面」へ移行するためメモ不可 □ □ □ □ ********************************* □Linuxコマンド例 パッケージ関連のコマンド:rpm パッケージインストール:rpm -ivh flm-1.2.3-4.i386.rpm パッケージ確認:rpm -qa パッケージ削除:rpm -e telnet-server パッケージ更新:rpm -Uvh vsftpd-xxxx パッケージ内ファイル一覧(DBから):rpm -ql flm パッケージ情報表示(ファイルから):rpm -qlp flm-1.2.3-4.i386.rpm ソースコードの展開:tar xvfz ファイル名 コンパイラやライブラリなどのコンパイル環境のCKとMakefileの作成:.configure コンパイル:make インストール:make install LINUXユーザアカウントの削除:userdel -r xxx LINUXユーザアカウントのパスワード有効期限設定:passwd -x 30 xxx LINUXユーザアカウントのパスワード変更禁止期間:passwd -n 30 xxx LINUXユーザアカウントのパスワード警告msg表示 :passwd -w 30 xxx 現在起動中のプロセス一覧の表示:ps a…自分以外が実行したプロセスも表示 u…実行したユーザ名、CPUやメモリ使用率、開始時刻等も表示 x…制御端末のないプロセス(デーモン等)の情報も表示 全配下のフォルダ&ファイルの一覧表示: ls -R | grep httpd-mpm 環境設定ファイルも一覧表示: ls -a 環境設定値の表示確認: set BASH=/bin/bash BASH_ENV=/root/.bashrc … 環境設定値の表示確認:echo $PATH /usr/kerberos/sbin /usr/kerberos/bin /usr/local/sbin /usr/local/bin /sbin /bin /usr/sbin /usr/bin /usr/X11R6/bin /root/bin ファイル等の検索:which ls alias ls= ls --color=tty /bin/ls 環境変数の追加:PATH=$PATH $HOME ※指定の仕方に注意する事] ファイル名の検索: find . -name index.jsp -print LINUX提供バックアップコマンド(フォルダorファイル単位):※バックアップ&リストア両方 tar オプション アーカイブ名 バックアップ対象 ※オプション解説…[x][t][c]は同時否定負荷 x…解凍/展開する t…一覧表示 c…アーカイブファイルを作成 v…実行過程を表示 f…アーカイブファイル名 z…圧縮/解凍 LINUX提供バックアップコマンド(パーティション単位):dump ※サービスの停止が必須 ↓ 1シングルユーザモードへの移行:「inti 1」 2アンマウントとファイルシステムCK:「umount /home; fsck -aV /dev/hda6」 3カートリッジテープにデータ退避: 「dump 0ut /def/st0 /dev/hda6」…[0]はフルダンプ 「dump 5ut /def/st0 /dev/hda6」…[5]は一週間分の増分ダンプ 「dump 9ut /def/st0 /dev/hda6」…[9]は9より低い値ところからの増分ダンプ 「dump 9ut /def/nst0 /dev/hda6」…[nst0]はテープの巻き戻し無し ※「df」コマンドで接続先を確認 LINUX提供リストアコマンド(パーティション単位):restore 例 「restore tf /dev/st0」テープ上の全てのダンプファイルを表示 「restore rf /dev/st0」フルリストア 「restore xf /dev/st0 ./user00」任意のファイルのリストア 「restore if /dev/st0」対話的にファイルのリストア
https://w.atwiki.jp/scalix/pages/27.html
内部ファイル構造を探る /etc /etc/httpd /etc/mail /opt /etc /etc/passwd scalix x 101 103 Scalix User /var/opt/scalix /bin/true /etc/srvices # Local services x500ms 5757/udp # Scalix X.500 Directory Server. scalixns 5766/udp # Scalix NewMail Server. scalixual 5729/tcp #Scalix UAL port. /etc/man.config MANPATH /opt/scalix/share/man /etc/httpd /etc/httpd/conf.d scalix-tomcat-connector.conf scalix-web-client.conf - /opt/scalix/global/httpd/scalix-web-client.conf /etc/mail /etc/mail/sendmail.cf 19,21c19,21 ##### built by root@revproxy2 on Tue May 1 22 48 25 JST 2007 ##### in /tmp/scalix-wizard.P16793/py ##### using /usr/share/sendmail-cf/ as configuration include directory # Scalix LDAP mapper Kldapsx ldap -h localhost -p 5757 -M simple -T TMPF -1 -b "" -v scalixInstanceName -k (mail=%0) # Check for mail destined for a local Scalix server R$+ @ $+ . $ $ ScalixMapper $1 @ $2 . $1 @ $2 ####################################### ### Scalix Mailer specification ### ####################################### ##### $Id scalix.m4,v 1.1 2006/10/20 10 32 19 jch Exp $ ##### SScalixMapper # do the LDAP lookup R $+ $+ $ $(ldapsx $2 $ $) $1 $2 # if temporary failire, return original address for MTA to queue up R $* TMPF $+ $+ $ $ {opMode} $| TMPF $ {addr_type} $| $2 R$* $| TMPF $* $| $+ $@ $3 # If matched by LDAP, resolve to the right Scalix mailer R $+ scalix $* $+ $# scalix_xport $@ $1 $ scalix R $+ $+ $+ $# scalix_mime $@ $1 $ $2 # ... otherwise return the original address R $+ $+ $@ $1 Mscalix_mime, P=/opt/scalix/bin/unix.in, F=PDFMXmnu, E=\n, A=unix.in -s $h Mscalix_xport, P=/opt/scalix/bin/xport.in, F=LMn, A=xport.in -s $h $u /opt scalix/ scalix-postgres/ scalix-tomcat/
https://w.atwiki.jp/spring_atoz/
はじめに このサイトは、Spring Frameworkを0からマスターするまで、メモを残しておきます。 あくまで、メモベースなので、これからSpring Frameworkをマスターする人にはお勧め 環境準備 1.環境変数にHOMEを追加する。具体的には、[コンピュータ]-[プロパティ]-[システムの詳細設定]-[環境変数]で行う。 自分のユーザディレクトリでもよい。 2.http //mergedoc.sourceforge.jp/より、「Pleiades All in One 4.2.1 Java Full Edition x64」をダウンロードし、D \pleiades\にインストール 3.ecpliseを起動し、workspaceをD \pleiades\workspaceを指定する。 4.[ヘルプ]-[Eclipseマーケットプレイス]-[SpringSource Tool Suite]をインストール Spring MVCでHello Worldの作り方 1.[ファイル]-[新規]-[Spring]-[Spring Template Project]-[Spring MVC Project]を選択 2.プロジェクト名を「springmvc_helloworld」、パッケージ名を「jp.sample.spring_mvc.helloworld」 ※パッケージ名は、会社のドメインを逆転させ、その下に名前を付けるのが一般的 3.パッケージ・エクスプローラーで、右クリックで[実行]-[サーバーで実行]-[Apache Tomcat v7.0]を選択し、 Tomcatインストール・ディレクトリを、D \pleiades\tomcat\7.0に指定し、サーバ実行する。 ※[ウィンドウ]-[ビューの表示]-[その他]-[サーバー]を選択すると、tomcatを起動、停止ができる。 4.http //localhost 8080/spring_helloworldで実行すると、Hello Worldが表示される。 Spring BatchでHello Worldの作り方 1.[ファイル]-[新規]-[Spring]-[Spring Template Project]-[Simple Spring Batch Project]を選択 2.プロジェクト名を「springmvc_helloworld」、パッケージ名を「jp.sample.spring_mvc.helloworld」 3.パッケージ・エクスプローラーで、右クリックで[実行]-[Maven clean]、[Maven install]でjarを作成 ※cleanをしないと、jarが見つからない状態になる。 4.パッケージ・エクスプローラーで、右クリックで[実行]-[実行の構成]を開き、 [Javaアプリケーション]-[CodeSwitcher]で、以下の設定を行い、実行を押すとHello Worldが表示される。 ・メイン・クラス=org.springframework.batch.core.launch.support.CommandLineJobRunner ・プログラムの引数=classpath /launch-context.xml job1 5.コマンドラインから実行する場合は、パッケージ・エクスプローラーで、右クリックで[実行]-[実行の構成]を開き、 [Maven install]を実行する。その後、pom.xmlを修正し、jar→warに変更して、再度[Maven install]を実行。その後は、以下のコマンドに従う。 cd D \pleiades\workspace\springbatch_helloworld\target\classes copy ..\spring-batch-simple-2.0.0.CI-SNAPSHOT.jar . set set classpath=D \pleiades\workspace\springbatch_helloworld\target\spring-batch-simple-2.0.0.CI-SNAPSHOT\WEB-INF\lib\*;D \pleiades\workspace\springbatch_helloworld\target\classes\* java org.springframework.batch.core.launch.support.CommandLineJobRunner /launch-context.xml job1 ※実際の環境に合わせて、classpathおよびlunch-context.xmlのパスを修正する。 [Spring Batch]log4jの使い方 ログの出力方法をコントロールし、log4j.propertiesを変更することにより、ログの出力方法を変更することができる。 エラーレベルは、DEBUG, INFO, WARN, ERROR, FATALの5つがあり、パッケージレベルで指定可能。 # コンソールへログを出力(デフォルトの指定) log4j.rootCategory=ERROR, stdout log4j.appender.stdout=org.apache.log4j.ConsoleAppender log4j.appender.stdout.layout=org.apache.log4j.PatternLayout log4j.appender.stdout.layout.ConversionPattern=%d %p [%c] - %m %n # ログファイルへ出力(D \test.logへ10MBで分割、最大50ファイル) log4j.rootCategory=ERROR, fileout log4j.appender.fileout=org.apache.log4j.RollingFileAppender log4j.appender.fileout.File=D /test.log log4j.appender.fileout.MaxFileSize=10MB log4j.appender.fileout.MaxBackupIndex=50 log4j.appender.fileout.layout=org.apache.log4j.PatternLayout log4j.appender.fileout.layout.conversionPattern=%d{yyyy/MM/dd HH mm ss.SSS} [%p] - %m%n # DBへ出力(oracleのLOG_TABLEへ出力) log4j.rootCategory=ERROR, dbout log4j.category.com.fc2web.himtodo.test=DEBUG, TEST log4j.appender.dbout=org.apache.log4j.jdbc.JDBCAppender log4j.appender.dbout.URL=jdbc oracle thin @127.0.0.1 1521 TEST log4j.appender.dbout.user=test log4j.appender.dbout.password=test log4j.appender.dbout.driver=oracle.jdbc.driver.OracleDriver log4j.appender.dbout.bufferSize=1 log4j.appender.dbout.layout=org.apache.log4j.PatternLayout log4j.appender.dbout.layout.conversionPattern=INSERT INTO LOG_TABLE VALUES ( %d{yyyy-MM-dd HH mm ss.SSS} , %p , %m ) # 実行した結果のみ出力する。 log4j.rootCategory=ERROR, stdout log4j.appender.stdout=org.apache.log4j.ConsoleAppender log4j.appender.stdout.layout=org.apache.log4j.PatternLayout log4j.appender.stdout.layout.ConversionPattern=%m log4j.logger.jp=INFO # 他にも、Unix Syslog デーモン、NT イベントログへ出力が可能。 [Spring Batch]Mavenでpostgresを追加し、DBとの連携を行う。 SpringBatchでは実行状態を保存するために、DBを使用する。そこで、postgresのJDBCをmavenで追加し、 batch.propertiesを設定する。 ※この設定をすると、毎回パラメータ(date=2012/1/1 name=1など)を変更しないと実行できなくなるので、要注意。 強制実行する場合は、引数に-nextを入れる。 1.postgresインストール後、pgAdminから新しいデータベース(springbatch)を作成する。 2.パッケージ・エクスプローラーで、右クリックで[Maven]-[依存関係の追加]を開く。 3.パターン(*)の入力で、「postgres」を入力すると、検索結果に「postgres postgres」が出てくるので、 その中から最新版を選択し、[OK]を押すと、postgresのJDBCドライバが追加される。 4.batch.propertiesを以下のように書き換え、バッチプログラムを実行すると、DBにテーブルが作成される。 batch.jdbc.driver=org.postgresql.Driver batch.jdbc.url=jdbc postgresql //localhost 5432/springbatch # use this one for a separate server process so you can inspect the results # (or add it to system properties with -D to override at run time). # batch.jdbc.url=jdbc hsqldb hsql //localhost 9005/samples batch.jdbc.user=postgres batch.jdbc.password= postgresで指定したパスワード batch.schema= batch.schema.script=classpath /org/springframework/batch/core/schema-postgresql.sql 5.2回目以降の実行で、テーブル作成は不要であるため、launch-context.xmlの以下の項目をコメントアウトする。 !-- jdbc initialize-database data-source="dataSource" jdbc script location="${batch.schema.script}" / /jdbc initialize-database --
https://w.atwiki.jp/lipsync/pages/37.html
Release Note リリース日 2007/12/30 注意事項 このバージョンのLipSync本体に同梱されているプラグインは、version1.0以前のものと互換性が全くありません。 このリリースでの新機能・変更点 RipSyncで使用されるプロジェクトファイル(*.rsp)を読み込めるようにした。 Ctrl+ZまたはCtrl+Shift+Zのキーが効かないことがある不具合を修正。 縦スクロールバーの位置が上端でない場合に、グレーのハイライト表示枠が正しい位置に描画されない不具合を修正。 キャラクタの位置指定のアンドゥ用コマンド作成時に、範囲外の配列インデクスを参照しようとして落ちる不具合を修正。 Download LipSync version 1.1a2 (195KB)
https://w.atwiki.jp/cappu/pages/43.html
Eclipseの実行ファイル eclipse.exe の場所 java.io.File f = new File("eclipse.exe"); String path = f.getAbsolutePath() ワークスペースの場所 ResourcesPlugin.getWorkspace().getRoot().getLocation().toOSString() プラグイン内のリソース try { Bundle bundle = Platform.getBundle("com.xxx");//プラグインID URL bundleUrl = bundle.getResource("icons");//プラグインからのリソースパス URL fileUrl = org.eclipse.core.runtime.FileLocator.toFileURL(bundleUrl);//変換 bundlePath = fileUrl.toString(); //getPath()でも可 pluginEntryPath = fileUrl.getPath(); // なぜか先頭は / となる // path = /C /・・・eclipse/workspace/com.xxx/ if (pluginEntryPath.charAt(0) == / ) { pluginEntryPath = pluginEntryPath.substring(1); } } catch (IOException e) { } プロジェクト一覧 ResourcesPlugin.getWorkspace().getRoot().getProjects() リソース変換 IFile to File IFile f = ...; IPath location = f.getLocation(); if (location != null) java.io.File file = location.toFile() org.eclipse.core.runtime.IPath → org.eclipse.emf.common.util.URI IPath path = delta.getMovedFromPath(); URI uri = URI.createPlatformResourceURI(path.toString(), true); org.eclipse.core.resources.IFile → org.eclipse.emf.common.util.URI IFile file = ...; URI uri = URI.createPlatformResourceURI(file.getFullPath().toString(), true); org.eclipse.core.resources.IFile → org.eclipse.emf.ecore.resource.Resource String path = ((IFile)parentElement).getFullPath().toString(); URI uri = URI.createPlatformResourceURI(path, true); TransactionalEditingDomain editingDomain = EditingDomainManager.getEditingDomain(file); ResourceSet resourceSet = editingDomain.getResourceSet(); Resource resource = resourceSet.getResource(uri, true); org.eclipse.emf.ecore.resource.Resource → org.eclipse.core.resources.IFile org.eclipse.emf.ecore.resource.Resource r = ...; IFile file = org.eclipse.emf.workspace.util.WorkspaceSynchronizer.getFile(r) EObject eobj = (EObject) selected; Resource r = eobj.eResource(); String strFile = r.getURI().toPlatformString(false); IFile iFile = ResourcesPlugin.getWorkspace().getRoot().getFile(new Path(strFile)); //プラグイン内のプロパティファイルの取得方法 Bundle bundle = Platform.getBundle("xxx.yyy.zzz.plugin"); URL propURL = FileLocator.toFileURL(bundle.getEntry("/resource/message.properties")); File file = new File(propURL.getFile()); Properties properties = new Properties(); properties.load(new FileInputStream(file));
https://w.atwiki.jp/lipsync/pages/116.html
Release Note リリース日 2008/08/17 既知のバグ (2008/08/30更新) その他のイメージとしてaviファイルを指定してあるlseファイルを開き直したとき、プレビュー時に落ちる。 テロップを削除しようとすると落ちる。 キャラクタ編集画面にて、新規画像を追加直後に、チェックボックスの表示と実際の設定が矛盾する。 テロップの文字を画面上で直接編集するモードの時、編集用テキストボックスが2個以上画面に出てしまう場合がある。(古い方のテキストボックスの文字を編集しようとすると落ちる。) プロパティビューでスタート時刻・テロップの文字などを変更しても、オブジェクトリストの表示内容が即座に反映されない。 その他のイメージとしてaviファイルを指定した時、aviファイルを開くのに失敗すると即落ちてしまう。 変位カーブを編集しても、本体画面側で「編集を行った」と認識されない。(保存しないまま閉じようとしても警告が出ない) 注意事項 version2.3で作成したキャラクタ設定ファイルは、このバージョンでは直接読込むことは出来ません。キャラクタ編集ダイアログで読込むには、拡張子を「.lsc」から「.zip」に変更し、解凍したうえで中身の「content.xml」を参照します。 このバージョンのLipSync本体に同梱されているプラグインは、version1.0以前のものと互換性が全くありません。 このバージョンの設定ファイル「LipSync.config」はversion1.1a5以前のものと互換性がありません。古い「LipSync.config」を削除してから起動するか、別のフォルダで起動するようにしてください。 [ファイル]メニューの[AVI出力]で無圧縮のAVIを作成した場合、ファイルサイズが2GBを超えるとAVIが壊れます(仕様です)。2GBを超える無圧縮AVIを出力する場合、[ファイル]メニューの[無圧縮AVI出力]を使ってください。 このリリースでの新機能・変更点 zip圧縮形式のキャラクタ設定ファイルの仕様を破棄。 このリリースでの不具合修正等 プラグインの全体設定がファイルの読込み時に反映されない不具合を修正。 Download LipSync version 2.31 (574KB) キャラクタ設定ファイル
https://w.atwiki.jp/lipsync/pages/79.html
Release Note リリース日 2008/02/04 既知のバグ (2008/02/06更新) テロップが追加済みの状態で「ファイル」-「VSQを開く」を使ってVSQを読込むと、警告なしに追加済みのテロップが削除されてしまう。 「ファイル」-「VSQを開く」にて。既存のファイルを上書きする旨のダイアログの結果の如何に拠らず、VSQの読込がキャンセルされてしまう。 画像のプレビューができない。 注意事項 このバージョンはversion2.1の機能をプレビューするためのアルファ・バージョンです。未確認の不具合が多数含まれている可能性がありますので、実際の作業に使用することはお勧めしません。 このバージョンのLipSync本体に同梱されているプラグインは、version1.0以前のものと互換性が全くありません。 また、このバージョンの設定ファイル「LipSync.config」はversion1.1a5以前のものと互換性がありません。古い「LipSync.config」を削除してから起動するか、別のフォルダで起動するようにしてください。 [ファイル]メニューの[AVI出力]で無圧縮のAVIを作成した場合、ファイルサイズが2GBを超えるとAVIが壊れます(仕様です)。2GBを超える無圧縮AVIを出力する場合、[ファイル]メニューの[無圧縮AVI出力]を使ってください。 このリリースでの新機能・変更点 オブジェクトをマウスドラッグで移動中のパフォーマンスを改善。 同じ母音が連続するとき(「ながら~」等)にも、各音の直前に一瞬口を閉じさせるようにした。 エントリを任意の位置で分割できるようにした。 プレビュー時のパフォーマンス(FPS)を表示するようにした。 画面で使用されるフォントを変更できるようにした。 プレビュー画面上でオブジェクトを選択したときの枠線の色が、背景色に適した色になるようにした。 プレビュー画面上でテキストをダブルクリックすると編集できるようにした。 このリリースでの不具合修正 「編集」-「やり直し」でテロップが正しく削除されない不具合を修正。 編集を行うたびにウィンドウタイトル・テキストがちらつくのを修正。 Download LipSync version 2.1a3 (508KB) キャラクタ設定ファイル
https://w.atwiki.jp/eclipsepluginstudy/pages/8.html
動画(youtube) @wikiのwikiモードでは #video(動画のURL) と入力することで、動画を貼り付けることが出来ます。 詳しくはこちらをご覧ください。 =>http //atwiki.jp/guide/17_209_ja.html また動画のURLはYoutubeのURLをご利用ください。 =>http //www.youtube.com/ たとえば、#video(http //youtube.com/watch?v=kTV1CcS53JQ)と入力すると以下のように表示されます。
https://w.atwiki.jp/ggl_codm/pages/32.html
概要 PLEADES Season2は2020年6月7日から6月28日まで開催されたリーグ大会です。 +ルール キャスター ・けーしん https //twitter.com/F7Ksin ・ちんぷろ https //twitter.com/Tinpro_CoDm アーカイブ +開く 賞金 賞金¥240,000と副賞としてe-suppleが優勝チームに送られました。 順位 賞金 チーム 🥇1st ¥240,000 REJECT 🥈2nd - 芝刈り機 🥉3rd - Noname Nix 夜桜 5th - JUPITER 6th - Hybrid Eclipse 参加チーム Noname Nix 1 NN_star_mkn* 2 NN_No.6 3 NN_Ryo*桜 4 NN_MiMi* 5 NN_Apple 6 TBD REJECT 1 RC_carly 2 RC_たーとる 3 RC_kou 4 RC_Cs7hamster 5 RC_McQueen 6 ぷらーな JUPITER 1 JUP_RisaCAT 2 JUP_Ranpo 3 JUP_AyuyK 4 JUP_Land 5 JUP_MeLo 6 xLiA Hybrid Eclipse 1 HE.Łøki 2 HE.蓮茶 3 HE.べびたーん 4 HE.ワッサーMY 5 HE.ぺおーん 6 TBD 芝刈り機 1 芝刈り機ゝ脱兎 2 芝刈り機ゝ正義 3 芝刈り機ゝ恐竜 4 芝刈り機ゝ猫茶 5 芝刈り機ゝ樂茶 6 TBD 夜桜 1 夜桜_Wanpu 2 夜桜_魔MACCHO 3 夜桜_xRarkS 4 夜桜_Łamilys 5 夜桜_TeiN 6 xocas 結果 ・Aリーグ Aリーグは夜桜、REJECT、JUPITERの3チーム。 順位 チーム マッチ ラウンド1 ラウンド2 1 REJECT 2-0 3 1 3 1 2 夜桜 1-1 1 3 3 0 3 JUPITER 0-2 1 3 1 3 ・Bリーグ Bリーグは芝刈り機、Hybrid Eclipse、Noname Nixの3チーム。 順位 チーム マッチ ラウンド1 ラウンド2 1 芝刈り機 2-0 3 1 3 1 2 Noname Nix 1-1 3 1 1 3 3 Hybrid Eclipse 0-2 1 3 1 3 本戦
https://w.atwiki.jp/kotya/pages/27.html
GlassFish https //glassfish.dev.java.net/ja/index.html Apache連携 http //weblogs.java.net/blog/jfarcand/archive/2006/03/running_glassfi_1.html http //weblogs.java.net/blog/amyroh/archive/2006/08/glassfish_suppo.html http //blogs.sun.com/dadelhardt/entry/loadbalancing_with_mod_jk_and_glassfish ①mod_jkのインストール Apache2.0.51ではこのバージョンで動いた http //archive.apache.org/dist/tomcat/tomcat-connectors/jk/binaries/linux/jk-1.2.19/ /etc/httpd/conf/httpd.confに以下を追記 LoadModule jk_module /usr/lib/httpd/modules/mod_jk.so JkWorkersFile /etc/httpd/conf/worker.properties # Where to put jk logs JkLogFile /var/log/httpd/mod_jk.log # Set the jk log level [debug/error/info] JkLogLevel debug # Select the log format JkLogStampFormat "[%a %b %d %H %M %S %Y] " # JkOptions indicate to send SSL KEY SIZE, JkOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories # JkRequestLogFormat set the request format JkRequestLogFormat "%w %V %T" # Send all jsp requests to GlassFish JkMount /*.jsp worker1 # Send all glassfish-test requests to GlassFish JkMount /glassfish-test/* worker1 #以下の3行はOnceClick対応の為 AddType application/x-ms-application application AddType application/x-ms-manifest manifest AddType application/octet-stream deploy /etc/httpd/conf/worker.propertiesを作成 # Define 1 real worker using ajp13 worker.list=worker1 # Set properties for worker1 (ajp13) worker.worker1.type=ajp13 worker.worker1.host=localhost.localdomain worker.worker1.port=8009 worker.worker1.lbfactor=50 worker.worker1.cachesize=10 worker.worker1.cache_timeout=600 worker.worker1.socket_keepalive=1 worker.worker1.socket_timeout=300 ②apache-tomcat-5.5.23.tar.gzよりtomcat-ajp.jarのコピー cp $CATALINA_HOME/server/lib/tomcat-ajp.jar $GLASSFISH_HOME/lib/ ③commons-logging、commons-modelerのインストール commons-logging-1.1.tar.gzとcommons-modeler-2.0.tar.gzより commons-loggingとcommons-modelerのjarを$GLASSFISH_HOME/lib/にコピー ④GlassFishのJVMオプションに以下を追加 Dcom.sun.enterprise.web.connector.enableJK=8009 Dcom.sun.enterprise.web.connector.enableJK.propertyFile=/etc/httpd/conf/worker.properties